<?php

use think\Route;

// 移动端
// 移动端登录页
Route::get('plogin','mobile/Log/login');
// 移动端登录处理
Route::post('doplogin','mobile/Log/dologin');
// 移动端注册
Route::get('pregister','mobile/Log/register');
// 移动注册处理
Route::post('dopregister','mobile/Log/doregister');
// 移动端退出
Route::get('doexit','mobile/Log/out');
// 移动端找回密码 加载页面
Route::get('pfindpass','mobile/Log/findpass');
// 移动端找回密码之手机号判断
Route::post('pdophone','mobile/Log/dophone');
// 加载找回修改密码页面
Route::get('plogdopass/:tel','mobile/Log/dopass');
// 移动端找回密码之更改新密码
Route::post('pdonewpass','mobile/Log/donewpass');


// 移动端首页
Route::get('phone','mobile/Index/index');
// 移动端分类页面
Route::get('tophone/:name','mobile/Index/ToIndex');
// 移动端详情页
Route::get('pdetail/:id','mobile/Pdetail/detail');
// 详情页 评论提交
Route::post('docontent','mobile/Pdetail/dopcontent');

// 移动端个人中心页
Route::get('pcenter','mobile/Center/index');
// 个人中心信息修改
Route::get('pdocenter/:id','mobile/Center/docenter');
// 处理个人中心修改
Route::post('pdocenterif','mobile/Center/docenterif');
// 修改密码页面
Route::get('pdopass/:id','mobile/Center/dopass');
// 修改密码确认
Route::post('paddpass','mobile/Center/addpass');
// 移动端问题提问页
Route::get('pproblem','mobile/Problem/index');
// 移动端提问提交
Route::post('pdosub','mobile/Problem/dosub');


// PC 端
//前台头部
Route::get('head','index/Head/head');

// 前台首页
Route::group('/',[
    '/' => 'index/index/index'
]);
Route::get('problemCate/:name','index/index/doCate');


// 前台提问
Route::get('add','index/Add/add');
Route::post('doadd','index/Add/doAdd');
Route::post('dodel','index/Add/doDel');

// 前台详情页
Route::get('details/:id','index/Details/details');
Route::get('doanswer/:id','index/Details/doanswer');
Route::post('dostatus','index/Details/doStatus');
Route::post('dopdel','index/Details/doPdel');
Route::post('pdopdel','index/Details/pDoPdel');
Route::post('docollect','index/Details/doCollect');
Route::post('dodiscollect','index/Details/doDisCollect');

// 个人中心
Route::get('center','index/Center/center');
// 其他人访问 个人中心
Route::get('tocenter/:id','index/index/toCenter');
// 关注
Route::post('dofollow','index/index/doFollow');
// 取消关注
Route::post('dodisfollow','index/index/doDisFollow');




//个人资料
Route::get('userdata','index/Center/userdata');
// 修改资料
Route::post('edituser','index/Center/edituser');

// 修改头像
Route::post('icon','index/Center/icon');
// 修改密码
Route::get('editpass','index/Center/editpass');
// 执行修改密码
Route::post('dopass','index/Center/dopass');



// 前台登录页
Route::group('log',[
    'login' => 'index/Log/login'
]);

// 执行登录
Route::post('dologin','index/DoLogin/dologin');

// 退出登录
Route::get('loginout','index/DoLogin/loginout');

// 前台注册页
Route::get('register','index/Register/register');

// 执行注册
Route::post('doregister','index/Register/doregister');


// 发送验证码
Route::get('sendSms','index/Register/sendSms');




// 后台首页
Route::get('ht','admin/Index/index');
Route::get('welcome','admin/Index/welcome');
Route::get('bye','admin/Index/Bye');

// 后台登录
Route::get('alogin','admin/AdminLogin/login');
Route::post('adolog','admin/AdminLogin/aDoLog');

// 会员管理
Route::group('User',[
    'userlist' => 'admin/User/UserList',
    'useradd' => 'admin/User/UserAdd',
    'useredit/:id' => 'admin/User/UserEdit',
    'doedit'=>'admin/User/DoEdit',
    'dodel'=>'admin/User/DoDel',
    'doadd'=>'admin/User/DoAdd'

]);

//问答管理
Route::group('Problem',[
    'problemlist' =>'admin/Problem/ProblemList',
    'problemdetalis/:id'=>'admin/Problem/ProblemDetails',
    'problemdel' => 'admin/Problem/ProblemDel'
]);

//分类管理
Route::group('Cate',[
   'catelist' => 'admin/Cate/CateList',
    'cateedit/:id' => 'admin/Cate/CateEdit',
    'cateadd' => 'admin/Cate/CateAdd',
    'doedit'=>'admin/Cate/DoEdit',
    'dodel'=>'admin/Cate/DoDel',
    'doadd'=>'admin/Cate/DoAdd'
]);

//管理员管理
Route::group('Auser',[
    'auserlist' =>'admin/Auser/UserList',
    'auseradd' => 'admin/Auser/UserAdd',
    'auseredit/:id' =>'admin/Auser/UserEdit',
    'auserdoedit' => 'admin/Auser/UserDoEdit',
    'auserdoadd' => 'admin/Auser/UserDoAdd',
    'auserstatusup' => 'admin/Auser/UserStatusUp',
    'auserstatusdown' => 'admin/Auser/UserStatusDown'
]);

//角色管理
Route::group('Role',[
    'rolelist'=>'admin/Role/RoleList',
    'roleedit/:id'=>'admin/Role/RoleEdit',
    'roleadd'=>'admin/Role/RoleAdd',
    'roledoadd'=>'admin/Role/RoleDoAdd',
    'rolestatusdown'=>'admin/Role/RoleStatusDown',
    'rolestatusup'=>'admin/Role/RoleStatusUp',
    'roledel'=>'admin/Role/RoleDel',
    'roledoedit'=>'admin/Role/RoleDoEdit'
]);

//权限管理
Route::group('Permission',[
    'permissionlist'=>'admin/Permission/PermissionList',
    'rule'=>'admin/Permission/PermissionRule',
    'permissionadd/:id'=>'admin/Permission/PermissionAdd',
    'permissiondoadd'=>'admin/Permission/PermissionDoAdd',
    'permissiondel'=>'admin/Permission/PermissionDel',
    'permissionaddto'=>'admin/Permission/PermissionAddTo',
    'permissiondoaddto'=>'admin/Permission/PermissionDoAddTo'
]);

//图标
Route::get('Icon','admin/Icon/Icon');








return [

];

